package com.xyy.saas.payment.adpater.aliPayHandler;

import com.xyy.saas.payment.common.exception.PaymentException;
import com.xyy.saas.payment.cores.bo.PayBo;
import com.xyy.saas.payment.cores.bo.TransactionResultBO;
import com.xyy.saas.payment.cores.enums.ResultCodeEnum;
import com.xyy.saas.payment.cores.param.TransactionParam;
import com.xyy.saas.payment.payment.core.dto.PayDto;

/**
 * 支付宝使用增加支付渠道的代码
 * @Author zhangwenxiong
 * @Date 2020/12/1 10:16
 * @Version 1.0
 */
public interface AliPayChannelHandler {
    String getMethod();

    PayBo pay(PayDto payDto) throws PaymentException;

    default TransactionResultBO queryPay(TransactionParam param) throws PaymentException {
        throw new PaymentException(ResultCodeEnum.UN_SUPPORT_METHOD);
    }
    default TransactionResultBO queryRefund(TransactionParam param) throws PaymentException {
        throw new PaymentException(ResultCodeEnum.UN_SUPPORT_METHOD);
    }
}
